import java.util.ArrayList;

/**
 * Stores a location in a locList
 * Enables GPS coord search
 * 
 * @author tomalteman
 *
 */
public class location {

	public String name;
	public double latitude;
	public double longitude;
	public ArrayList<String> variant;
	public ArrayList<String> metarea;
	public ArrayList<String> good;
	public ArrayList<String> bad;
	public double distance;
	
	public location(){
		name = "";
		latitude = 0;
		longitude = 0;
		distance = 0;
		variant = new ArrayList<String>();
		metarea = new ArrayList<String>();
		good = new ArrayList<String>();
		bad = new ArrayList<String>();
	}
	
	/**
	 * Returns string of list for output
	 * @param list
	 * @param regex
	 * @return
	 */
	public String ListToString(ArrayList<String> list, String regex)
	{
		String s = "";
		
		for(int i=0;i<(list.size()-1);i++) s = s +list.get(i) + regex;
		if(list.size()>0) s = s + list.get(list.size()-1);
		
		return s;
	}
	
}
